package com.loyal.gps;

public class LocationConfig {
    private static final long DEFAULT_INTERVAL_TIMER = 2000L;
    private static final float DEFAULT_MIN_DISTANCE = 1.0f;

    /***/
    private @LoopType String loopType = LoopType.ONCE;
    /**
     * 位置刷新间隔时长，单位：ms
     */
    private long intervalTime = DEFAULT_INTERVAL_TIMER;
    /**
     * 位置刷新距离，单位：m
     */
    private float minDistance = DEFAULT_MIN_DISTANCE;
    /***/
    private int loopCount;

    public LocationConfig() {
    }

    public long getIntervalTime() {
        return intervalTime;
    }

    public void setIntervalTime(long intervalTime) {
        this.intervalTime = Math.max(intervalTime, DEFAULT_INTERVAL_TIMER);
    }

    public int getLoopCount() {
        return loopCount;
    }

    public void setLoopCount(int loopCount) {
        this.loopCount = loopCount;
    }

    public String getLoopType() {
        return loopType;
    }

    public void setLoopType(String loopType) {
        this.loopType = loopType;
    }

    public float getMinDistance() {
        return minDistance;
    }

    public void setMinDistance(float minDistance) {
        this.minDistance = minDistance;
    }
}
